#include <iostream>
using namespace std;

string s, t, s1, t1;
int q, l1, r1, l2, r2;

int main()
{
	cin >> s >> t;
	cin >> q;
	while (q--)
	{
		cin >> l1 >> r1 >> l2 >> r2;
		s1 = s.substr(l1 - 1, r1 - l1 + 1);
		t1 = t.substr(l2 - 1, r2 - l2 + 1);
		if (s1 < t1)
			cout << "yifusuyi" << endl;
		else if (s1 > t1)
			cout << "erfusuer" << endl;
		else
			cout << "ovo" << endl;
	}
	
	return 0;
}
